package services;

import dao.ICustom;
import factory.CustomDaoFactory;
import vo.Custom;

import java.util.List;

public class CustomServicempl implements ICustomService{
    ICustom iCustom= CustomDaoFactory.getInstance();//获取对应的(客户操作类)接口对象,向上转型

    @Override
    public boolean add(Custom custom) {
        return iCustom.add(custom);//调用转型后的操作类的方法
    }

    @Override
    public boolean delete(Custom custom) {
        return iCustom.delete(custom);
    }

    @Override
    public boolean modify(Custom custom) {
        return iCustom.modify(custom);
    }

    @Override
    public Custom getcustombyid(String id) {
        return iCustom.getcustombyid(id);
    }

    @Override
    public List<Custom> getall() {
        return iCustom.getall();
    }
}
